# eric7.PluginManager.PluginInstallDialog

Module implementing the Plugin installation dialog.

### Global Attributes

None

### Classes

PluginInstallDialog | Class for the dialog variant.
PluginInstallWidget | Class implementing the Plugin installation dialog.
PluginInstallWindow | Main window class for the standalone dialog.

### Functions

None

## PluginInstallDialog

Class for the dialog variant.

### Derived from

QDialog

### Class Attributes

None

### Class Methods

None

### Methods

PluginInstallDialog | Constructor
restartNeeded | Public method to check, if a restart of the IDE is required.

### Static Methods

None

#### PluginInstallDialog (Constructor)

PluginInstallDialog(pluginManager, pluginFileNames, parent=None)

Constructor

pluginManager (PluginManager)
  reference to the plugin manager object
pluginFileNames (list of str)
  list of plugin files suggested for installation
parent (QWidget)
  reference to the parent widget

#### PluginInstallDialog.restartNeeded

restartNeeded()

Public method to check, if a restart of the IDE is required.

Return:
  flag indicating a restart is required

Return Type:
  bool

Up

## PluginInstallWidget

Class implementing the Plugin installation dialog.

### Derived from

QWidget, Ui_PluginInstallDialog

### Class Attributes

None

### Class Methods

None

### Methods

PluginInstallWidget | Constructor
__createArchivesList | Private method to create a list of plugin archive names.
__installPlugin | Private slot to install the selected plugin.
__installPlugins | Private method to install the selected plugin archives.
__makedirs | Private method to create a directory and all intermediate ones.
__rollback | Private method to rollback a failed installation.
__selectPage | Private method to show the right wizard page.
__uninstallPackage | Private method to uninstall an already installed plugin to prepare the update.
on_addArchivesButton_clicked | Private slot to select plugin ZIP-archives via a file selection dialog.
on_archivesList_itemSelectionChanged | Private slot called, when the selection of the archives list changes.
on_buttonBox_clicked | Private slot to handle the click of a button of the button box.
on_removeArchivesButton_clicked | Private slot to remove archives from the list.
restartNeeded | Public method to check, if a restart of the IDE is required.

### Static Methods

None

#### PluginInstallWidget (Constructor)

PluginInstallWidget(pluginManager, pluginFileNames, parent=None)

Constructor

pluginManager (PluginManager)
  reference to the plugin manager object
pluginFileNames (list of str)
  list of plugin files suggested for installation
parent (QWidget)
  parent of this dialog

#### PluginInstallWidget.__createArchivesList

__createArchivesList()

Private method to create a list of plugin archive names.

Return:
  list of plugin archive names

Return Type:
  list of str

#### PluginInstallWidget.__installPlugin

__installPlugin(archiveFilename)

Private slot to install the selected plugin.

archiveFilename (str)
  name of the plugin archive file

Return:
  flag indicating success (boolean), error message upon failure (string) and flag indicating a restart of the IDE is required

Return Type:
  bool

#### PluginInstallWidget.__installPlugins

__installPlugins()

Private method to install the selected plugin archives.

Return:
  flag indicating success

Return Type:
  bool

#### PluginInstallWidget.__makedirs

__makedirs(name, mode=0o777)

Private method to create a directory and all intermediate ones.

This is an extended version of the Python one in order to record the created directories.

name (str)
  name of the directory to create
mode (int)
  permission to set for the new directory

#### PluginInstallWidget.__rollback

__rollback()

Private method to rollback a failed installation.

#### PluginInstallWidget.__selectPage

__selectPage()

Private method to show the right wizard page.

#### PluginInstallWidget.__uninstallPackage

__uninstallPackage(destination, pluginFileName, packageName)

Private method to uninstall an already installed plugin to prepare the update.

destination (str)
  name of the plugin directory
pluginFileName (str)
  name of the plugin file
packageName (str)
  name of the plugin package

#### PluginInstallWidget.on_addArchivesButton_clicked

on_addArchivesButton_clicked()

Private slot to select plugin ZIP-archives via a file selection dialog.

#### PluginInstallWidget.on_archivesList_itemSelectionChanged

on_archivesList_itemSelectionChanged()

Private slot called, when the selection of the archives list changes.

#### PluginInstallWidget.on_buttonBox_clicked

on_buttonBox_clicked(button)

Private slot to handle the click of a button of the button box.

button (QAbstractButton)
  reference to the button pressed

#### PluginInstallWidget.on_removeArchivesButton_clicked

on_removeArchivesButton_clicked()

Private slot to remove archives from the list.

#### PluginInstallWidget.restartNeeded

restartNeeded()

Public method to check, if a restart of the IDE is required.

Return:
  flag indicating a restart is required

Return Type:
  bool

Up

## PluginInstallWindow

Main window class for the standalone dialog.

### Derived from

EricMainWindow

### Class Attributes

None

### Class Methods

None

### Methods

PluginInstallWindow | Constructor

### Static Methods

None

#### PluginInstallWindow (Constructor)

PluginInstallWindow(pluginFileNames, parent=None)

Constructor

pluginFileNames (list of str)
  list of plugin files suggested for installation
parent (QWidget)
  reference to the parent widget

Up